package com.ruoyi.eqmonitor.controller;

import java.text.ParseException;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eqmonitor.service.IOptDeviceMonitorMonthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.web.controller.BaseController;

/**
 * 设备监测数据——每月数据
 * @author ruoyi0
 * @date 2023-03-08
 */
@RestController
@RequestMapping("/month")
public class OptDeviceMonitorMonthController extends BaseController{
    
    @Autowired
    private IOptDeviceMonitorMonthService optDeviceMonitorMonthService;

    /**
     * 根据设备类型查询瞬时流量和液位高度，一年的数据
     * @param type 设备类型
     * @param time 起始时间
     */
    @GetMapping("/selectWaterCondition")
    public AjaxResult selectWaterCondition(String type,String time) throws ParseException {
        return AjaxResult.success(optDeviceMonitorMonthService.selectWaterCondition(type,time));
    }

}
